<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.js"></script>
    <link href="Fliter.css" rel="stylesheet"/>
    <script src="Filter.js"></script>
</head>
<body>
<div id="demo1"></div>
<input id="demo_value" type="text" value="">
<div class="FilterQuery1">12321312</div>
<script type="text/javascript">
    var data = [
        {
            "id": 1,
            "text": "中国"
        },
        {
            "id": 2,
            "text": "中国2"
        },
        {
            "id": 3,
            "text": "中国3"
        },
        {
            "id": 4,
            "text": 4
        }]
    //例子1
    //单选
    $('#demo1').comboboxfilter({
        url: 'http://tmc/agent/train/ticketsAvailableApi',
        scope: 'list',
        data: data,
        onChange: function (newValue) {
            $('#demo_value').val(newValue);
        }
    });
</script>
</body>
</html>